package com.eigaland.change_machine

import android.app.Application
import com.orhanobut.logger.AndroidLogAdapter
import com.orhanobut.logger.Logger
import com.orhanobut.logger.PrettyFormatStrategy

public class APP :Application(){

    companion object{
        lateinit var app : APP
    }


    override fun onCreate() {
        super.onCreate()
        initLogger()
        initFireBase()
        app = this
    }

    /**
     * init logger
     */
    private fun initLogger(){
        var formatSt = PrettyFormatStrategy.newBuilder()
            .showThreadInfo(false)
            .methodCount(0).methodOffset(7).tag("LEO_2").build()

        Logger.addLogAdapter(object: AndroidLogAdapter(formatSt){
            override fun isLoggable(priority: Int, tag: String?): Boolean {
                return true
            }
        })
    }

    private fun initFireBase(){

    }
}